package factorial

import "big"

/*
   Calculate the factorial value between 'start' and 'end', inclusive.
*/
func FactRange(start *big.Int, end *big.Int) (total *big.Int) {
    total = big.NewInt(1)

    one := big.NewInt(1)

    for end.Cmp(start) > -1 {
        total.Mul(total, end)
        end.Sub(end, one)
    }

    return // Bare return implies the variable(s) specified in signature.
}
